#ifndef _NEW_H_2012_06_31_
#define _NEW_H_2012_06_31_

#include "zmalloc.h"

#define NEW(T, nItems)\
	(T*)zmalloc(sizeof(T)*(nItems))

#define RENEW(T, pOldPtr, nNewItems)\
	(T*)zrealloc(pOldPtr, sizeof(T)*nNewItems)

#define DELETE(p) do {\
	zfree(p);\
}while(0)

#define MEMORY_USED zmalloc_used_memory() 

#define ENABLE_ZMALLOC_THREAD_SAFE do {\
	zmalloc_enable_thread_safeness();\
}while(0)

#define DISABLE_ZMALLOC_THREAD_SAFE do {\
   zmalloc_disable_thread_safeness();\
}while(0)

#endif
